<?php
    class MY_Controller extends Controller{
        var $_data=FALSE;
        var $container='container'; 
        function MY_Controller(){
            parent::Controller();
            $this->load->helper('url');
            $this->load->helper('form');
            $this->load->library('form_validation');
            $this->load->library('session');
             $this->load->helper('avis_helper');
             $this->load->helper('date');
        }
        function _load_view($path){
            //before_render();
            $this->_data['load_path']=$path;
            $this->load->view($this->container,$this->_data);
        }
        
        function before_render(){

        }

    }

    class FrontEnd_Controller extends MY_Controller{
        function FrontEnd_Controller(){
            parent::MY_Controller();
            $header['page']="home/header";
            $footer['page'] = "home/footer";
            $this->_data['header']=$header;
            $this->_data['footer']=$footer;
            $this->_data['page_title']='home';
        }
        function before_render(){
			 $this->_data['news_data'] = $this->Home_m->list_news();
        }
    }
    class Admin_Controller extends MY_Controller{
        function Admin_Controller(){
            parent::MY_Controller();
            $header['page']="admin/header";
            $footer['page'] = "admin/footer";
            $this->_data['header']=$header;
            $this->_data['footer']=$footer;
            $this->_data['page_title']='Administrator';
        }
    }
?>
